package com.mvetc.util;

import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegExUitl {
	
	public static List<String> regEx(String patten,String textArea) {
		String pattern = patten;
		Pattern compile = Pattern.compile(pattern);
		Matcher matcher = compile.matcher(textArea);
		List<String> targetList = new ArrayList<String>();
		while (matcher.find()) {
			String substring = textArea.substring(matcher.start(), matcher.end());
			targetList.add(substring);
		}
		return targetList;
	}

}
